<layout name="Iflayout"/>
<div class="xyh-content">

    <div class="row">
        <div class="col-lg-12">
            <h3 class="page-header"><em class="glyphicon glyphicon-cloud-upload"></em>
                栏目列表
            </h3>
        </div>
    </div>

    <div class="row margin-botton">
        <div class="col-md-6 column">
            <div class="btn-group btn-group-md">
                <button class="btn btn-primary" type="button" onclick="goUrl('{:U(\'category/add\')}')"><em class="glyphicon glyphicon-plus-sign"></em> 添加栏目</button>
                <button class="btn btn-default" type="button" onclick="doGoSubmit('{:U(\'category/sort\')}','form_do')"><em class="glyphicon glyphicon-th-list"></em> 更新排序</button>
            </div>
        </div>
    </div>

    <div class="row">
        <div class="col-lg-12">
            <form action="{:U('category/sort')}" method="post" id="form_do" name="form_do">
                <div class="table-responsive">
                    <table class="table table-hover xyh-table-bordered-out">
                        <thead>
                        <tr class="active">
                            <th>编号</th>
                            <th>名称</th>
                            <th>所属模型</th>
                            <th>显示</th>
                            <th>排序</th>
                            <th class="text-right">操作</th>
                        </tr>
                        </thead>
                        <tbody>
                            <foreach name="list" item="val">
                                <tr>
                                    <td>{$val[id]}</td>
                                    <td class="aleft">{$val[pid]==0?'':'├─'}<a href="/xyhai.php?s=/Page/index/pid/1">{$val[name]}</a></td>
                                    <td >单页模型</td>
                                    <td><span class="label label-success">{$val[islock]==1?'正常':'锁定'}</span></td>
                                    <td><input type="text" name="sortlist[1]" value="{$val[sortlist]}" id="sortlist" size="5" disabled class="xyh-form-control" /></td>
                                    <td class="text-right">

                                        <a href="{:U('category/add',array('pid'=>$val[id]))}" class="label label-primary">添加子栏目</a>
                                        <a href="/xyhai.php?s=/Page/index/pid/1" class="label label-info">列表</a>
                                        <a href="/xyhai.php?s=/Category/edit/id/1" class="label label-success">修改</a>
                                        <a href="javascript:;" onclick="toConfirm('/xyhai.php?s=/Category/del/id/1', '确实要删除吗？')" class="label label-danger">删除</a>
                                    </td>
                                </tr>
                                <foreach name="val['child']" item="value">
                                    <tr>
                                        <td>{$value[id]}</td>
                                        <td class="aleft">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;├─<a href="/xyhai.php?s=/Page/index/pid/1">{$value[name]}</a></td>
                                        <td >单页模型</td>
                                        <td><span class="label label-success">{$value[islock]==1?'正常':'锁定'}</span></td>
                                        <td><input type="text" name="sortlist[1]" value="{$value[sortlist]}" id="sortlist" size="5" disabled class="xyh-form-control" /></td>
                                        <td class="text-right">

                                            <a href="{:U('category/add',array('pid'=>$value[id]))}" class="label label-primary">添加子栏目</a>
                                            <a href="/xyhai.php?s=/Page/index/pid/1" class="label label-info">列表</a>
                                            <a href="/xyhai.php?s=/Category/edit/id/1" class="label label-success">修改</a>
                                            <a href="javascript:;" onclick="toConfirm('/xyhai.php?s=/Category/del/id/1', '确实要删除吗？')" class="label label-danger">删除</a>
                                        </td>
                                    </tr>
                                </foreach>
                            </foreach>
                        </tbody>
                    </table>
                </div>
            </form>
        </div>
    </div>
</div>
</body>
</html>


array(

)